package cn.moukou.playground.spring.cloud.consumer.controller;

import cn.moukou.playground.spring.cloud.consumer.remote.RemoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@EnableDiscoveryClient
@RestController
public class ApiController {

    @Autowired
    RemoteService remoteService;

    @GetMapping("/hello")
    public String hello() {
        return remoteService.RemoteHello();
    }
}
